x86/shadow: don't needlessly expose internal functions
authorJan Beulich <jbeulich@suse.com>
Tue, 3 Feb 2015 10:35:01 +0000 (11:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Feb 2015 10:35:01 +0000 (11:35 +0100)
... and drop an unused one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/private.h
xen/include/asm-x86/shadow.h

index 56d14e4ba03456b6237c1a463ceebca52393e0c4..005cbe235c9af067a349a342f57ead19164a8edd 100644 (file)
@@ -2383,7 +2383,7 @@ int sh_remove_write_access_from_sl1p(struct vcpu *v, mfn_t gmfn,
 /* Remove all mappings of a guest frame from the shadow tables.
  * Returns non-zero if we need to flush TLBs. */
 
-int sh_remove_all_mappings(struct vcpu *v, mfn_t gmfn)
+static int sh_remove_all_mappings(struct vcpu *v, mfn_t gmfn)
 {
     struct page_info *page = mfn_to_page(gmfn);
 
index 82c22e867a94ad19b0c09372f39d216cc6d416f3..72518fd613b63e95b6e8135f8facdb3f256a4d69 100644 (file)
@@ -387,6 +387,11 @@ int shadow_write_guest_entry(struct vcpu *v, intpte_t *p,
 int shadow_cmpxchg_guest_entry(struct vcpu *v, intpte_t *p,
                                intpte_t *old, intpte_t new, mfn_t gmfn);
 
+/* Update all the things that are derived from the guest's CR0/CR3/CR4.
+ * Called to initialize paging structures if the paging mode
+ * has changed, and when bringing up a VCPU for the first time. */
+void shadow_update_paging_modes(struct vcpu *v);
+
 /* Unhook the non-Xen mappings in this top-level shadow mfn.
  * With user_only == 1, unhooks only the user-mode mappings. */
 void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn, int user_only);
index f2ce352b3f757319b393b19203e1ba2b881608d4..308ce809d078512684964153fff27b533a1d5b4c 100644 (file)
@@ -77,23 +77,6 @@ void shadow_teardown(struct domain *d);
 /* Call once all of the references to the domain have gone away */
 void shadow_final_teardown(struct domain *d);
 
-/* Update all the things that are derived from the guest's CR0/CR3/CR4.
- * Called to initialize paging structures if the paging mode
- * has changed, and when bringing up a VCPU for the first time. */
-void shadow_update_paging_modes(struct vcpu *v);
-
-
-/* Remove all mappings of the guest page from the shadows. 
- * This is called from common code.  It does not flush TLBs. */
-int sh_remove_all_mappings(struct vcpu *v, mfn_t target_mfn);
-static inline void 
-shadow_drop_references(struct domain *d, struct page_info *p)
-{
-    if ( unlikely(shadow_mode_enabled(d)) )
-        /* See the comment about locking in sh_remove_all_mappings */
-        sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(p)));
-}
-
 /* Remove all shadows of the guest mfn. */
 void sh_remove_shadows(struct vcpu *v, mfn_t gmfn, int fast, int all);
 static inline void shadow_remove_all_shadows(struct vcpu *v, mfn_t gmfn)